/*
* Copyright (c) 2007 by Kirill Kolodyazhniy.
* See the file "license.terms" for information on usage and redistribution.
*/

#ifndef M_LFNODE_H
#define M_LFNODE_H

namespace Engine
{
	namespace LockFree
	{
		/**
		*   Structure represent node for lock free data structures.
		*/
		template<typename T>
		struct node
		{
			T value;                  ///< Value that node holds.

			node<T> * volatile pNext; ///< Pointer to next node.

			/**
			*   Default constructor.
			*/
			node() : value(), pNext(0) {}

			/**
			*   Constructor.
			*   @param v value for holds in node.
			*/
			node(T v) : pNext(0), value(v) {}
		};
	}
}
#endif
